<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>信息管理</title>
		
	<style>
	    main {
	      width: 1200px;
	      margin: 0 auto;
	      border: 1px solid blue;
	    }
	
	    .m-search {
	      padding: 10px;
	      border: 1px solid gray;
	    }
	
	    .m-cont {
	      padding: 10px;
	      border: 1px solid gray;
	    }
	
	    table {
	      width: 100%;
	      text-align: center;
	    }
	
	    tr {
	      height: 40px;
	    }
	
	    table,
	    td,
	    th {
	      border: 1px solid orange;
	      border-collapse: collapse;
	    }
    </style>
		
		
	</head>
	<body>
		
	<main>
    <div class="m-search">
      	姓名: <input type="text" name="name" id="uname"><button>搜索</button><a href="add.html">添加</a>
    </div>
    
    
    <div class="m-cont">
		<table>
			<thead>
				<tr>
					<th>序号</th>
					<th>班级</th> 
					<th>姓名</th>
					<th>性别</th>
					<th>年龄</th>
					<th>爱好</th>
					<th>电话</th>                                  
					<th>地址</th>          
					<th>职业</th>
					<th>日期</th>
					<th>操作</th>
					<th>操作</th>
				</tr>  
			</thead>

			<tbody>

			</tbody>	
		</table>
    </div>
  </main>

  	<script src="js/utils.js"></script>
  	<script type="text/javascript">	
		select("http://localhost:3008/api/student/getStudent",null);
		
		document.querySelector('button').onclick=function(){
  			var unname=document.querySelector('#uname');
  			select("http://localhost:3008/api/student/getStudent",unname.value)
  		}

		function del(id){
			if (confirm("是否删除")) {
				console.log(id);
				MyPostDate("http://localhost:3008/api/student/removeStudent","id="+id)
				
			}
		}

  	</script>
  
		
		
		
	</body>
</html>
